package com.mornd.gulimall.search.controller;

import com.mornd.gulimall.apis.search.to.SkuEsModel;
import com.mornd.gulimall.common.core.result.R;
import com.mornd.gulimall.search.service.ProductService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: mornd
 * @dateTime: 2023/8/9 - 18:00
 */

@RestController
@RequestMapping("/search/product")
public class ProductController {
    @Resource
    private ProductService productService;

    @PostMapping("/up")
    public R<Boolean> statusUp(@RequestBody List<SkuEsModel> skuEsModels) {
        boolean success = productService.statusUp(skuEsModels);
        return R.ok(success);
    }
}
